﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>jQuery Fundamentals</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <style>
        #blog p.excerpt
        {
            display: none;
        }
    </style>
</head>
<body>
    <div id="main">
        <form id="search">
        <label for="q">
            Enter search term</label>
        <input type="text" name="q" class="input_text" />
        <input type="submit" value="Go" />
        </form>
        <h1>
            Eat here.</h1>
        <p>
            Lorem ipsum dolor sit amet, <a href="#">consectetur adipisicing elit</a>,
            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
            veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
            consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
            dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
            sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        <ul id="slideshow">
            <li>
                <h2 rel="yummy fruit!">
                    Fruit</h2>
                <img src="images/fruit.jpg" alt="fruit" />
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
                    exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
                    irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
                    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                    deserunt mollit anim id est laborum.</p>
            </li>
            <li>
                <h2>
                    Vegetables</h2>
                <img src="images/vegetable.jpg" alt="vegetables" />
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
                    exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
                    irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
                    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                    deserunt mollit anim id est laborum.</p>
            </li>
            <li>
                <h2>
                    Bread</h2>
                    <img src="images/bread.jpg" alt="bread" />
                                    <p>
                    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
                    exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
                    irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
                    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                    deserunt mollit anim id est laborum.</p>
            </li>
        </ul>
        <ul id="myList">
            <li>List item 1</li>
            <li id="listItem_2" class="bar">List item 2</li>
            <li id="myListItem">List item 3</li>
            <li>List item 4</li>
            <li class="current bar">List item 5</li>
            <li>List item 6</li>
            <li>List item 7</li>
        </ul>
        <div class="module" id="blog">
            <h2>
                Blog</h2>
            <ul>
                <li>
                    <h3>
                        <a href="#">Blog post 1</a></h3>
                    <p class="excerpt">
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                        incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
                        exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
                        irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
                        pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                        deserunt mollit anim id est laborum.</p>
                </li>
                <li>
                    <h3>
                        <a href="#">Blog post 2</a></h3>
                    <p class="excerpt">
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                        incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
                        exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
                        irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
                        pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                        deserunt mollit anim id est laborum.</p>
                </li>
                <li>
                    <h3>
                        <a href="#">Blog post 3</a></h3>
                    <p class="excerpt">
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                        incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
                        exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
                        irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
                        pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                        deserunt mollit anim id est laborum.</p>
                </li>
            </ul>
        </div>
        <div class="module" id="specials">
            <h2>
                Specials</h2>
            <p>
                Choose the day of the week to see the specials:</p>
            <form action="#" method="get">
            <ul>
                <li>
                    <select name="day">
                        <option value="" selected="selected">Select</option>
                        <option value="monday">Monday</option>
                        <option value="tuesday">Tuesday</option>
                        <option value="friday">Friday</option>
                    </select>
                </li>
                <li class="buttons">
                    <input type="submit" class="input_submit" value="Go" />
                </li>
            </ul>
            </form>
        </div>
        <table id="fruits">
            <thead>
                <tr>
                    <th>
                        Apples
                    </th>
                    <th>
                        Oranges
                    </th>
                    <th>
                        Pears
                    </th>
                    <th>
                        Nectarines
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        1
                    </td>
                    <td id="myTableCell">
                        2
                    </td>
                    <td>
                        3
                    </td>
                    <td>
                        4
                    </td>
                </tr>
                <tr>
                    <td>
                        2
                    </td>
                    <td>
                        6
                    </td>
                    <td>
                        4
                    </td>
                    <td>
                        8
                    </td>
                </tr>
                <tr>
                    <td>
                        1
                    </td>
                    <td>
                        7
                    </td>
                    <td>
                        5
                    </td>
                    <td>
                        3
                    </td>
                </tr>
                <tr>
                    <td>
                        20
                    </td>
                    <td>
                        30
                    </td>
                    <td>
                        10
                    </td>
                    <td>
                        100
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
	<script>
		$('img').attr('alt', 'an ALT attribute');
		$('input[name="q"]').parent().addClass('search');
		$('#myList')
			.find('myListItem').addClass('curent');
		$('#myList')
			.find('myListItem').removeClass('curent');
		$("#myListItem").next().css('background-color','red');
	</script>
</body>
</html>
